Users may experience startup delays when a computing system or application starts up because of the data and software modules that the system or application must load from physical storage to memory. The data and code accessed during a system or application startup may be referred to as prefetch data. As computing systems and applications become larger and more complex, the size of prefetch data may grow and may cause startup delays to increase.
To reduce startup delays, some systems and applications may use prefetchers. For example, an operating system may use a prefetcher that monitors code and data accessed during a boot process. The prefetcher may store the information collected during the boot process in a trace file. Subsequent boots of the operating system may use the trace file to load code and data more efficiently. Similarly, applications may use prefetchers that monitor code and data accessed during application startup, and trace files created by an application prefetcher may be used to start the application more efficiently in the future.
Some prefetch technologies may attempt to improve boot or startup times by optimizing organization of prefetch data on physical storage. For example, a system may use a trace file to defragment prefetch data. Some systems and applications may also use trace files to physically organize prefetch data in the order in which it is accessed during startup. By optimizing organization of the prefetch data on physical storage, systems may decrease access time for the prefetch data, which may reduce startup delays.
Unfortunately, traditional prefetch technologies may not reduce startup delays in virtual machines. A virtual machine runs on a host machine. The host machine may interface with the virtual machine by providing the virtual machine with emulated hardware, such as a virtual disk. The host may implement a virtual disk as a file on the host's physical storage device, and the host may distribute this virtual disk file arbitrarily on the host's physical storage device. The virtual disk file may be stored in one part or in segments, contiguously or non-contiguously, ordered or unordered, with various segments of the virtual disk file on physically disparate portions of the host's physical storage device.
When a virtual machine employs a prefetch technology that optimizes prefetch data organization, prefetch data may be placed in optimal locations on the virtual disk. However, because the virtual disk file may be distributed arbitrarily across the host's physical storage device, optimally reorganizing prefetch data relative to the virtual disk results in arbitrary, rather than optimal, reorganization of the prefetch data on the host's physical storage device. Because the prefetch data is arbitrarily reorganized on the host's physical storage device, startup time may not decrease and could even increase.